from peewee import CharField, IntegerField, DateTimeField, AutoField, SQL

from application.db import get_database_connection
from application.db.mysql_db.base_mysql_model import BaseMysqlModel


class CnArticleTypeRelation(BaseMysqlModel):
    """文献与文献类型关系表"""
    article_id = CharField(max_length=32, index=True)  # 文献ID，表cn_article_list标识
    type_code = CharField(max_length=32, index=True)  # 文献类型代码，表cn_article_type_dict标识

    class Meta:
        table_name = 'cn_article_type_relation'
        database = get_database_connection('default')  # 使用默认数据库



if __name__ == '__main__':
    # 测试代码
    print("CnArticleTypeRelation ORM Model")